<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Structures  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset='utf-8'>
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
    <a title="Structures  Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="index.html">Restofire Docs</a> (85% documented)</p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="index.html">Restofire Reference</a>
        <img id="carat" src="img/carat.png" />
        Structures  Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Classes/AnyResponseSerializer.html">AnyResponseSerializer</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/DownloadOperation.html">DownloadOperation</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/NetworkOperation.html">NetworkOperation</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/RequestOperation.html">RequestOperation</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/UploadOperation.html">UploadOperation</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Enums/ParametersType.html">ParametersType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Extensions/JSONEncoding.html">JSONEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="Extensions/Result.html">Result</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Protocols/ArrayParameterEncoding.html">ArrayParameterEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Authenticable.html">Authenticable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/BackgroundQosable.html">BackgroundQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/BaseRequestable.html">BaseRequestable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Cancellable.html">Cancellable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Configurable.html">Configurable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/CoreDataSyncable.html">CoreDataSyncable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/DataUploadable.html">DataUploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/DefaultQosable.html">DefaultQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Downloadable.html">Downloadable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/FileUploadable.html">FileUploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/HighQueuePriortizable.html">HighQueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/LowQueuePriortizable.html">LowQueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/MultipartUploadable.html">MultipartUploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/NormalQueuePriortizable.html">NormalQueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Pollable.html">Pollable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Qosable.html">Qosable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/QueuePriortizable.html">QueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Queueable.html">Queueable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Reachable.html">Reachable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/RequestDelegate.html">RequestDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Requestable.html">Requestable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/ResponseSerializable.html">ResponseSerializable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Retryable.html">Retryable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/SessionManagable.html">SessionManagable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/StreamUploadable.html">StreamUploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Syncable.html">Syncable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Uploadable.html">Uploadable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/UserInitiatedQosable.html">UserInitiatedQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/UserInteractiveQosable.html">UserInteractiveQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/UtilityQosable.html">UtilityQosable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Validatable.html">Validatable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/VeryHighQueuePriortizable.html">VeryHighQueuePriortizable</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/VeryLowQueuePriortizable.html">VeryLowQueuePriortizable</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Structs/Authentication.html">Authentication</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/Configuration.html">Configuration</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/Poll.html">Poll</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/Queues.html">Queues</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/Reachability.html">Reachability</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/Retry.html">Retry</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/SessionManager.html">SessionManager</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/Validation.html">Validation</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire11DataRequesta">DataRequest</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire12DataResponsea">DataResponse</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire22DataResponseSerializera">DataResponseSerializer</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire15DownloadRequesta">DownloadRequest</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire16DownloadResponsea">DownloadResponse</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire10HTTPHeadera">HTTPHeader</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire11HTTPHeadersa">HTTPHeaders</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire10HTTPMethoda">HTTPMethod</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire12JSONEncodinga">JSONEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire20JSONParameterEncodera">JSONParameterEncoder</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire17MultipartFormDataa">MultipartFormData</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire26NetworkReachabilityManagera">NetworkReachabilityManager</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire16ParameterEncodera">ParameterEncoder</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire17ParameterEncodinga">ParameterEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire7RFErrora">RFError</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire8RFResulta">RFResult</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire7Requesta">Request</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire7Sessiona">Session</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire30URLEncodedFormParameterEncodera">URLEncodedFormParameterEncoder</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire11URLEncodinga">URLEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire21URLRequestConvertiblea">URLRequestConvertible</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9Restofire13UploadRequesta">UploadRequest</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Structures</h1>
            <p>The following structures are available globally.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire14AuthenticationV"></a>
                    <a name="//apple_ref/swift/Struct/Authentication" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire14AuthenticationV">Authentication</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An Authentication for RESTful Services.</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">authentication</span> <span class="o">=</span> <span class="kt">Authentication</span><span class="p">()</span>
<span class="n">authentication</span><span class="o">.</span><span class="n">credential</span> <span class="o">=</span> <span class="kt">URLCredential</span><span class="p">(</span>
    <span class="nv">user</span><span class="p">:</span> <span class="s">"user"</span><span class="p">,</span>
    <span class="nv">password</span><span class="p">:</span> <span class="s">"password"</span><span class="p">,</span>
    <span class="nv">persistence</span><span class="p">:</span> <span class="o">.</span><span class="n">forSession</span>
<span class="p">)</span>
</code></pre>

                        <a href="Structs/Authentication.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Authentication</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire13ConfigurationV"></a>
                    <a name="//apple_ref/swift/Struct/Configuration" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire13ConfigurationV">Configuration</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A Configuration for RESTful Services. You must provide a <code>host</code>.</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">configuration</span> <span class="o">=</span> <span class="kt">Configuration</span><span class="p">()</span>
<span class="n">configuration</span><span class="o">.</span><span class="nv">scheme</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="s">"https"</span>
<span class="n">configuration</span><span class="o">.</span><span class="n">baseURL</span> <span class="o">=</span> <span class="s">"www.mocky.io"</span>
<span class="n">configuration</span><span class="o">.</span><span class="n">version</span> <span class="o">=</span> <span class="s">"v2"</span>
<span class="n">configuration</span><span class="o">.</span><span class="n">headers</span> <span class="o">=</span> <span class="p">[</span><span class="s">"Content-Type"</span><span class="p">:</span> <span class="s">"application/json"</span><span class="p">]</span>
</code></pre>

                        <a href="Structs/Configuration.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Configuration</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire4PollV"></a>
                    <a name="//apple_ref/swift/Struct/Poll" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire4PollV">Poll</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A Poll for RESTful Services.</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">poll</span> <span class="o">=</span> <span class="kt">Poll</span><span class="p">()</span>
<span class="n">poll</span><span class="o">.</span><span class="n">pollingInterval</span> <span class="o">=</span> <span class="mf">1.0</span>
</code></pre>

                        <a href="Structs/Poll.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Poll</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire6QueuesV"></a>
                    <a name="//apple_ref/swift/Struct/Queues" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire6QueuesV">Queues</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A Queues for RESTful Services.</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">queues</span> <span class="o">=</span> <span class="kt">Queues</span><span class="p">()</span>
<span class="n">queues</span><span class="o">.</span><span class="n">completionQueue</span> <span class="o">=</span> <span class="kt">DispatchQueue</span><span class="o">.</span><span class="n">main</span>
</code></pre>

                        <a href="Structs/Queues.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Queues</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire12ReachabilityV"></a>
                    <a name="//apple_ref/swift/Struct/Reachability" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire12ReachabilityV">Reachability</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A Reachability for RESTful Services.</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">reachability</span> <span class="o">=</span> <span class="kt">Reachability</span><span class="p">()</span>
<span class="n">reachability</span><span class="o">.</span><span class="n">eventually</span> <span class="o">=</span> <span class="kc">true</span>
<span class="n">reachability</span><span class="o">.</span><span class="n">networkReachabilityManager</span> <span class="o">=</span> <span class="kt">NetworkReachabilityManager</span><span class="p">()</span><span class="o">!</span>
</code></pre>

                        <a href="Structs/Reachability.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Reachability</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire5RetryV"></a>
                    <a name="//apple_ref/swift/Struct/Retry" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire5RetryV">Retry</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A Retry for RESTful Services.</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">retry</span> <span class="o">=</span> <span class="kt">Retry</span><span class="p">()</span>
<span class="n">retry</span><span class="o">.</span><span class="n">retryErrorCodes</span> <span class="o">=</span> <span class="p">[</span><span class="o">.</span><span class="n">timedOut</span><span class="p">,</span><span class="o">.</span><span class="n">networkConnectionLost</span><span class="p">]</span>
<span class="n">retry</span><span class="o">.</span><span class="n">retryInterval</span> <span class="o">=</span> <span class="mi">20</span>
<span class="n">retry</span><span class="o">.</span><span class="n">maxRetryAttempts</span> <span class="o">=</span> <span class="mi">10</span>
</code></pre>

                        <a href="Structs/Retry.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Retry</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire14SessionManagerV"></a>
                    <a name="//apple_ref/swift/Struct/SessionManager" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire14SessionManagerV">SessionManager</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A Session for RESTful Services.</p>
<pre class="highlight swift"><code><span class="kt">Session</span><span class="o">.</span><span class="k">default</span><span class="o">.</span><span class="n">session</span> <span class="o">=</span> <span class="p">{</span>
    <span class="k">let</span> <span class="nv">sessionConfiguration</span> <span class="o">=</span> <span class="kt">URLSessionConfiguration</span><span class="o">.</span><span class="k">default</span>
    <span class="n">sessionConfiguration</span><span class="o">.</span><span class="n">timeoutIntervalForRequest</span> <span class="o">=</span> <span class="mi">7</span>
    <span class="n">sessionConfiguration</span><span class="o">.</span><span class="n">timeoutIntervalForResource</span> <span class="o">=</span> <span class="mi">7</span>
    <span class="n">sessionConfiguration</span><span class="o">.</span><span class="kt">HTTPAdditionalHeaders</span> <span class="o">=</span> <span class="kt">Manager</span><span class="o">.</span><span class="n">defaultHTTPHeaders</span>
    <span class="k">return</span> <span class="kt">Session</span><span class="p">(</span><span class="nv">configuration</span><span class="p">:</span> <span class="n">sessionConfiguration</span><span class="p">)</span>
<span class="p">}</span>
</code></pre>

                        <a href="Structs/SessionManager.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SessionManager</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9Restofire10ValidationV"></a>
                    <a name="//apple_ref/swift/Struct/Validation" class="dashAnchor"></a>
                    <a class="token" href="#/s:9Restofire10ValidationV">Validation</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A Validation for RESTful Services.</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">validation</span> <span class="o">=</span> <span class="kt">Validation</span><span class="p">()</span>
<span class="n">validation</span><span class="o">.</span><span class="n">acceptableStatusCodes</span> <span class="o">=</span> <span class="kt">Array</span><span class="p">(</span><span class="mi">200</span><span class="o">..&lt;</span><span class="mi">300</span><span class="p">)</span>
<span class="n">validation</span><span class="o">.</span><span class="n">acceptableContentTypes</span> <span class="o">=</span> <span class="p">[</span><span class="s">"application/json"</span><span class="p">]</span>
</code></pre>

                        <a href="Structs/Validation.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Validation</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2020 <a class="link" href="https://github.com/Restofire/Restofire" target="_blank" rel="external">Rahul Katariya</a>. All rights reserved. (Last updated: 2020-02-19)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
